package cn.tedu.straw.portal.service;

import cn.tedu.straw.commons.model.UserCollection;
import cn.tedu.straw.commons.vo.UserCollectionVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tedu.cn
 * @since 2020-07-30
 */
public interface IUserCollectionService extends IService<UserCollection> {
    /**
     * 查询收藏列表
     * @param userId
     * @param page
     * @return
     */
    PageInfo<UserCollectionVO> getUserCollections(Integer userId, Integer page);



    /**
     * 插入一条收藏
     * @param userId
     * @param questionId
     * @return
     */
    UserCollection post(Integer userId,Integer questionId);

    /**
     * 删除一条收藏
     * @param userId
     * @param questionId
     * @return
     */
    Integer deletes(Integer userId,Integer questionId);

    /**
     * 查询一条收藏
     * @param userId
     * @param questionId
     * @return
     */
    Integer selectByIds( Integer userId, Integer questionId);

}
